package com.quanquan.user.entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 功能描述: 自助积分实体
 *
 * @ClassName: SelfHelpIntegral
 * @Author: xiaoqianh丶
 * @Date: 2019-04-11 17:48
 * @Version: V1.0
 */
@Data
@Entity
@Table(name = "oo_self_help_integral")
public class SelfHelpIntegral implements Serializable {

    /**
     * 主键
     */
    @Id
    @Column(name = "id", unique = true, length = 64)
    private String id;

    /**
     * 创建时间
     */
    @Column(name = "create_time", nullable = false, length = 32)
    private String createTime;

    /**
     * 小票图片
     */
    @Column(name = "img_url",length = 128)
    private String imgUrl;

    /**
     * 小票号
     */
    @Column(name = "ticket_num",nullable = false,length = 64)
    private String ticketNum;

    /**
     * 金额
     */
    @Column(name = "money",length = 32)
    private String money;

    /**
     * 商户id
     */
    @Column(name = "store_id",length = 64)
    private String storeId;


    /**
     * 用户id
     */
    @Column(name = "user_id",length = 64)
    private String userId;

    /**
     * 消费日期
     */
    @Column(name = "cosume_day",length = 64)
    private String consumeDay;


    /**
     * 申请状态
     */
    @Column(name = "application_status",length = 32)
    @Enumerated(EnumType.STRING)
    private SelfHelpIntegral.Application applicationStatus;

    public enum Application {
        /**
         * 审核中 审核未通过 通过审核
         */
        reviewing, failpass ,successpass
    }


    /**
     * 审核和备注
     */
    @Column(name = "remark_application",length = 255)
    private String remarkApplication; //运营备注

    /**
     * 数据是否移除
     */
    @Column(name = "status_remove", columnDefinition = "TINYINT default 0",nullable = false)
    private Integer remove;

    /**
     * 用户手机号
     */
    @Column(name = "phone",length = 32)
    private String phone;

    @Column(name = "receive_point", length = 32)
    private String receivePoint;

    /**
     * 审核渠道
     **/
    @Column(name = "audit_channel", length = 32)
    private String auditChannel;
}
